package com.shiminghui;

import java.util.Scanner;

public class MaiJiPiao {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int price=scanner.nextInt();
        int mouth=scanner.nextInt();
        int seat = scanner.nextInt();
        if (mouth>=5&&mouth<=10){
            price = getPrice(seat, price, 0.9, 0.85);
        }else if (mouth>=1&&mouth<=4||mouth>=11&&mouth<=12) {
            price = getPrice(seat, price, 0.7, 0.65);
        }
        System.out.println(price);

    }

    private static int getPrice(int seat, int price, double x, double x1) {
        if (seat == 1) {
            price = (int) (price * x);
        } else if (seat == 0) {
            price = (int) (price * x1);
        } else {
            System.out.println("没有这个舱位");
        }
        return price;
    }


}
